package com.dstation.dao;

import com.dstation.domain.CoinOperatedInfo;
import com.dstation.domain.OrderInfo;
import com.dstation.domain.SubscriptionPackageInfo;
import org.apache.ibatis.annotations.Param;

public interface CoinOperatedInfoMapper {

    int selectCoinNumByVideoId(Long videoId);

    CoinOperatedInfo selectOperateCoinInfoByUserIdAndVideoId(@Param("userId")long userId, @Param("videoId")long videoId);

    boolean insertCoinOperatedInfo(@Param("userId")long userId, @Param("videoId")long videoId,@Param("createDate")String createDate);

    boolean deleteCoinOperatedInfo(@Param("userId")long userId, @Param("videoId")long videoId);

    int insertSubScriptionOfCoin(@Param("subscriptionPackageInfo") SubscriptionPackageInfo subscriptionPackageInfo);

    int insertOrderInfo(@Param("orderInfo") OrderInfo orderInfo);

    int updateOrderStatusByOrderNo(@Param("out_trade_no") String out_trade_no, @Param("status") int status);

    int updateCoinNumByUserID(@Param("userId") Long userId, @Param("coinNum") double coinNum);

    OrderInfo selectOrderByOrderNum(String orderNum);
}